package com.central.scheduler.common.utils;

import com.central.scheduler.common.Constants;
import org.apache.commons.lang.StringUtils;

/**
 * @author Tindy
 * @date 2022/1/5
 * @describe
 * sensitive log Util
 */
public class SensitiveLogUtils {

    private SensitiveLogUtils() {
        throw new UnsupportedOperationException("Construct SensitiveLogUtils");
    }

    /**
     * @param dataSourcePwd data source password
     * @return String
     */
    public static String maskDataSourcePwd(String dataSourcePwd) {

        if (!StringUtils.isEmpty(dataSourcePwd)) {
            dataSourcePwd = Constants.PASSWORD_DEFAULT;
        }
        return dataSourcePwd;
    }

}
